A hash function is a function that can be used to map data of an arbitrary size to data of a fixed size. The values returned by a hash function are typically referred to as hash values. A cryptographic hash function is a special class of hash functions that has certain properties that make it suitable for use in cryptography. In particular, a cryptographic hash function has the property of being a one-way function (i.e., a function which is infeasible to invert). Input data to a cryptographic hash function may be referred to as an input message and the output of the function may be referred to as a message digest.
The Secure Hash Algorithm (SHA) is a family of cryptographic hash functions published by the National Institute of Standards and Technology (NIST). Included among the SHA family of cryptographic hash functions are SHA-0, SHA-1, SHA-2, and SHA-3. The SHA hash functions differ in various aspects such as, for example, the size of the output in bits, the block size in bits, and so forth. Further, multiple variations of a particular SHA hash function may exist. For example, SHA-3 has a number of different variations such as SHA3-256 and SHA3-512 which differ, among other things, in the size of the output that they generate. SHA-3 also includes variants such as SHAKE128 and SHAKE 256 that are extended output functions (XOFs) that produce outputs of arbitrary size.